-
Notifications
You must be signed in to change notification settings - Fork 264
Added note for Global Ajax Event Handlers #797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -67,6 +67,9 @@ | |||
<xsl:when test="@id = 'detach-shorthand'"> | |||
As the <code>.<xsl:value-of select="@data-event"/>()</code> method is just a shorthand for <code>.on( "<xsl:value-of select="@data-event"/>", handler )</code>, detaching is possible using <code>.off( "<xsl:value-of select="@data-event"/>" )</code>. | |||
</xsl:when> | |||
<xsl:when test="@id = 'global-ajax-event'"> | |||
Starting with jQuery 1.9, all the handlers for the <a href="/category/ajax/global-ajax-event-handlers/">jQuery global Ajax events</a>, including those added with the <code><xsl:value-of select="@data-title"/></code> method, must be attached to <code>document</code>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it 1.9 or 1.8? Descriptions currently say 1.8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In 1.8 you should, in 1.9 you must. Is that clear enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. I think what you have is fine then. We typically use "As of jQuery x.x" instead of "Starting with x.x." Would you mind changing that phrase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated based on your suggestion :)
Thanks @AurelioDeRosa. Are you going to also remove the notes that currently appear in the |
I think your comment is related to #798. Can you check that issue I raised? |
Yeah, that's what I saw. What I'm suggesting is, if you're adding the "global" note to each method, you should also remove the "local" note. |
In this case, should I highlight that from 1.8 is recommended, but from 1.9 is mandatory? |
Never mind. I (finally) see what you're getting at. Maybe just change the global note from "must" to "must" (using If you do that, then it LGTM, so feel free to merge it.. |
@kswedberg updated based on your comment :) |
Excellent. Thanks, @AurelioDeRosa ! Wanna merge it in? |
@kswedberg Done! |
Thanks, @AurelioDeRosa ! |
Fixes gh-479